<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JS消息提示框</title>
<script language="javascript">
var name = prompt("请输入你的名字","Jason");
function display_prompt() {
	if(""!=name&&name!=""){
		
		document.write("你好"+name);
	}
}
</script>

</head>
<body>
<input type="button" onclick="display_prompt()" value="显式" />
</body>
</html>